package cn.net.xyan.yypt.dto

import com.fasterxml.jackson.annotation.JsonProperty
import java.math.BigDecimal

abstract class CreateOrderReq{

    @JsonProperty("out_trade_no")
    var outTradeNo:String? = null

    @JsonProperty("total_amount")
    var totalAmount:BigDecimal? = null

    @JsonProperty("subject")
    var subject:String? = null

    @JsonProperty("body")
    var body:String? = null

    @JsonProperty("timeout_express")
    var timeoutExpress:String? = null

    @JsonProperty("notify_url")
    var notifyURL:String? = null
}

class CreateQRCodeOrderReq: CreateOrderReq(){
    @JsonProperty("payment_type")
    var paymentType:String? = null

    @JsonProperty("operator_id")
    var operatorID:String? = null

    @JsonProperty("terminal_id")
    var terminalID:String? = null
}

class CreateBarCodeOrderReq: CreateOrderReq(){

    @JsonProperty("auth_code")
    var authCode:String? = null

    @JsonProperty("payment_type")
    var paymentType:String? = null

    @JsonProperty("operator_id")
    var operatorID:String? = null

    @JsonProperty("terminal_id")
    var terminalID:String? = null
}

class CreatePolymerizationQRCodeReq: CreateOrderReq(){

    @JsonProperty("operator_id")
    var operatorID:String? = null

    @JsonProperty("terminal_id")
    var terminalID:String? = null

    @JsonProperty("disable_pay_channels")
    var disablePayChannels:String? = null
}

class QueryOrderReq{

    @JsonProperty("out_trade_no")
    var outTradeNo:String? = null

    @JsonProperty("trade_no")
    var tradeNo:String? = null

    @JsonProperty("payment_type")
    var paymentType:String? = null

}

class QueryRefundReq{

    @JsonProperty("out_trade_no")
    var outTradeNo:String? = null

    @JsonProperty("trade_no")
    var tradeNo:String? = null

    @JsonProperty("out_request_no")
    var outRequestNo:String? = null

    @JsonProperty("payment_type")
    var paymentType:String? = null

}

class RefundOrderReq{

    @JsonProperty("out_trade_no")
    var outTradeNo:String? = null

    @JsonProperty("trade_no")
    var tradeNo:String? = null

    @JsonProperty("trade_amount")
    var tradeAmount:BigDecimal? = null

    @JsonProperty("refund_amount")
    var refundAmount:BigDecimal? = null

    @JsonProperty("payment_type")
    var paymentType:String? = null

    @JsonProperty("out_request_no")
    var outRequestNo:String? = null

    @JsonProperty("refund_reason")
    var refundReason:String? = null

    @JsonProperty("operator_id")
    var operatorID:String? = null

    @JsonProperty("terminal_id")
    var terminalID:String? = null
}